package cn.wolfcode.wechat.controller;

import cn.wolfcode.wechat.query.ClientQueryObject;
import cn.wolfcode.wechat.service.IClientService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ClientController {

    @Autowired
    private IClientService clientService;

    @RequestMapping("client")
    public String clientList(ClientQueryObject qo, Model model){
        PageInfo pageResult = clientService.query(qo);
        model.addAttribute("pageResult",pageResult);
        model.addAttribute("qo",qo);
        return "client";
    }
}
